package com.learn.spring.async.listener;

import com.learn.spring.async.order.PlaceOrderEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * 监控埋点观察者
 * @author: MI
 * @email 448341911@qq.com
 * @createDate: 2023/10/21 11:30
 * @updateUser: MI
 * @updateDate: 2023/10/21 11:30
 * @updateRemark: 修改内容
 * @version: v1.0
 */
@Slf4j
@Service
public class OrderMetricsListener {

    @Async
    @EventListener
    public void metrics(PlaceOrderEvent event) {
        log.info("【afterPlaceOrder】Metrics.");
    }
}
